﻿@model PaginaWeb.Models.Marca

@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/_AdministradorLayout.cshtml";
}

<h2>Details</h2>


<fieldset>
    <legend>Marca</legend>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.nombre)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.nombre)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.descripcion)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.descripcion)
    </div>
    <div class="display-field">
        <img src="@Html.DisplayFor(model => model.foto)" height="300" width="300" />
    </div>
</fieldset>

<p>
    @Html.ActionLink("Edit", "Edit", new { id=Model.id }) |
    @Html.ActionLink("Back to List", "Index")
</p>
<fieldset>
    <legend>Lista de Productos</legend>
    <table class="table table-striped">
          <tr>
                <th>Nombre</th>
                <th>Modelo</th>
                <th>Marca</th>
                <th>Precio</th>
                <th>Descripcion</th>
                <th>Foto</th>
            </tr>
    

    @foreach (var prod in Model.productos){

        
        <tr>
            <td><a href="~/MiProducto/Details/@prod.id">@prod.nombre</a></td>
            <td>@prod.modelo</td>
            <td>@prod.marca.nombre</td>
            <td>@prod.precio</td>
            <td>@prod.descripcion</td>
            <td><img src="@prod.url" height="100" width="100" /></td>
        </tr>
       
    }
       </table>  
</fieldset>
